{% extends 'common/base.html'%}

{% block head %}
	<link rel="stylesheet" href="{% static 'css/index.min.css' %}">
	<script src = '{% static 'js/jquery-3.3.1.min.js'%}'></script>
	<script src = '{% static 'js/index.min.js'%}'></script>	
{% endblock%}

{% block title%}
	首页
{% endblock%}

{% block main%}
	<div class="main">
		<div class="wrapper">
			<div class="main-content-wrapper">
				<div class="banner-group">
					<ul class="banner-ul">
						<li><a href=""><img src="https://static-image.xfz.cn/1529553938_445.png" alt=""></a></li>
					</ul>
				</div>
				
				<div class="list-outer-group">					
					<ul class="list-tab">
						<li><a href="{% url 'index' %}" class="special-a">最新</a></li>
						{% for category in categories %}
							<li><a href="{% url 'category' category_id=category.id %}" class="">{{category.name}}</a></li>
						{% endfor %}						
					</ul>					
					
				<ul class="list-inner-group">
					{% for new in news %}
						<li>
							<div class="thumbnall-group">
								<a href="{% url 'news_detail' new_id=new.id %}"><img src="/media/{{new.thumbnail}}" alt=""></a>
							</div>

							<div class="news-group">
								<p class="title"><a href="{% url 'news_detail' new_id=new.id %}">{{new.title}}</a></p>
								<p class="desc">{{new.desc}}</p>
								<p class="more">
									<span class="left-more">{{new.category.name}}</span>
									<span class="right-more">{{new.pub_time}}</span>
									<span class="right-more">{{new.author.username}}</span>	
								</p>
							</div>
						</li>
					{% endfor %}
				</ul>
		
				</div>

				<div class="load-more-group">
					<button class="load-more">加载更多</button>
				</div>
			</div>

			{% include 'common/sidebar.html' %}
		</div>
	</div>	
{% endblock%}